home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
EDITOR
/
AMAC44.ARJ
/
BOOK25.QM
< prev
next >
Wrap
Text File
|
1992-06-22
|
15KB
|
335 lines
* BOOK25.QM
* Macros To Jump To BookMarks and
* Load Macros Across Files
* Written by Tom Hogshead
* 6/22/92
* Key Subfile Description
* ===== ============ ==================================================
* @4 <BEST> - Jump from Index Line to First Word ( )
* Enclosed with ( ) in the File Below,
* (Quicker Version of @1 That Positions
* Cursor on First Index Selection Line)
* @1 - Jump from Index Line to First Word Enclosed
* with ( ) in the File Below
* @2 - Finds First Word on Cursor Line in File Below,
* "Marked" or "Unmarked", and Encloses Selected
* Found Word in File with ( )
* @3 - Copies Word at Cursor in File to Index Enclosing
* Word at Cursor and Word in Index with ( )
* f4 - Continues Searching Until the Desired Word
* is Found in File Below Using @2
*--
* @f {e:\up\bok001} - Jump from Index Line to Macro |chg
* @6 {e:\up\bok001} - Read/Load Txtfile Macros from Index |chg
* @7 {e:\up\bok001} - Read Macros from Index, Txtfile Not Loaded |chg
* @8 {e:\up\bok001} - Read/Load Macros at Cursor Line |chg
* @9 {e:\up\bok001} - Read Macros at Cursor Line, Txtfile Not Loaded |chg
* @eq {e:\up\bok001} - Read Current Txtfile's Macros (@=)
* @p {e:\up\bok001} - Decrypt Macro @f
* f4 {e:\up\bok001} - Jump to Another Occurence of Index Selection
*--
* @h - Jump To Index Item In Current File
*
* {e:\up\INDX*} - Index of Macros In AMACxx.ZIP
*
* Description
* Configuration, MUST Do
* Using Macros, Startup and Macro Execution
* Macros
* Other Macros not Included
* Version History
*
*-- eoi
* (Description)
* --------------
* BOOK25.QM are a series of macros enabling the user to load,
* read, and/or invoke macros located in any file. Files, items
* or macros may be quickly located in any file by enclosing a key
* identification word in parentheses and placing the bookmarked
* word as the first word in an Index line. This version includes
* macros using the new and *not recommended* technique of a
* "macro reading a macro".
* A theoretically unlimited number of macros (in excess of the
* limited 0.5k QConfig.dat buffer) located in files other than
* the current file can be quickly located and easily executed at
* any time using either @f, @6, @7 or @8 while editing any file.
* (See bok001.qm for additional discussion).
* For anyone using more than a few macros and who might be tight
* on QConfig macro buffer space, the macros in bok001.qm may be
* of interest; they enable me to have immediate access while
* editing any file, to quickly load and run over 500 macros in
* about 100 files compiled to more than 20,000 macro bytes -- and
* with 50 bytes QConfig macro buffer space to spare.
* The techniques, necessary configuring, and use of these
* bookmark macros require a considerable knowlege of QMAC and
* QEdit macro language. The new techniques they involve have not
* been fully tested. These are my first real effort to have a
* macro read a macro, a heretofore (and still) not recommended
* procedure. Until this "macro reading a macro" technique can be
* fully tested and proven to be viable, I do *not* advise the
* user use this technique in other macros without full knowledge
* of it's pitfalls and limitations.
* (Configuration), MUST Do
* ---------------------------
* In order to access files and/or invoke macros in different
* directories, all files listed in 'e-up.lst' MUST be configured
* for the user directory containing AMAC files. My directory,
* e:\up, occurs over 100 times and must be changed using the
* following configuration procedure which takes a few minutes
* to do the search/replace and compile using QMAC:
* 1) Make a two letter directory on your hard drive named \UP.
* If this conflicts, then any two letter directory will
* suffice.
* 2) First expand all files in AMACxx.ZIP to \UP directory.
* 3) Change to \UP directory.
* 4) Replace 'e:\up\' with [d:\path] in all files in the file
* list 'e-up.lst' using SRQ.BAT search/replace batch file from
* SRCHxx.QM:
* SRQ.BAT e:\up [d:\path] @e-up.lst <enter>
* e.g., if c:\amac is your directory containing AMAC files:
* SRQ.BAT e:\up c:\amac @e-up.lst <enter>
* ^^^^^^^
* The total size of files in e-up.lst is greater than 400k
* which is larger than the QEdit can handle, so we must either
* use SRQ.BAT as shown here, or repeat the search/replace
* using SR.BAT until all replacements have been made.
* 5) After the search/replace is complete, exit QEdit and convert
* changed txtfiles to macfiles using QMAC with the following:
* E-UP.BAT
* 6) Put the following bok001.qm macro in QCONFIG.DAT, changing
* dir:\ to your directory containing AMAC files:
* @f macro_begin macroread "[d:\path\]bok001.mac" return
* e.g.,
* @f macro_begin macroread "c:\amac\bok001.mac" return
* ^^^^^^^
* 7) The following macros in bok001.qm should also be installed
* in QConfig.dat and then commented out of bok001.qm after
* installation. They will then be available in any editing
* session as long as no subsequently installed macros have the
* same keys:
* ^f1 Cycle Between Starting and Selected Files After Invoking @6
* @0 Save Current Macro Buffer, Read Previously Saved Macro Buffer
* @= Read Current Txtfile Macros
* @- Read Previously Saved Macro Buffer
* 8) After completion of steps 4 and 5 above, changing c:\ to a
* ram drive in all macros in bok001.qm will increase macro
* execution speed, although this in not necessary.
* (Using) Macros
* ---------------
* The following examples demonstrate the use of macros in
* bok001.qm using @6 and @f. To execute bok001.qm macros, be
* sure Insert is ON and then:
* 1) Load BOOK25.QM into a QEdit window.
* 2) Read the macfile bok001.mac as follows:
* @f <enter>
* Macros @f and all other macros in bok001.qm are now loaded.
* 3) Run @6. Cursor down to desired txtfile in INDXxx.QM to load
* the selected txtfile, and press <enter>. At the next pause,
* cursor down to desired macro to load it's txtfile and read
* it's macros. Selecting @f will load subfile bok001.qm and
* read it's macros, with the cursor positioned on a
* description of @f.
* 4) Press ^f1 to cycle between BOOK25.QM and bok001.qm
* 5) Press @6 again to select, load and read another set of
* macros.
* These macros require "QEdit and QMAC v2.1, February, 1990" or later.
* (Other) Macros: See ALLMACRO.INF for other macros. See also
* JMPPOSxx.QM for macros to jump to positions within
* and across files using position markers.
* Use of @(h)
* ------------
* @h is key used for @1 or @4 in many other macro files. For use of @h
* see instructions in @1 below.
* (Macros)
* M A C R O S
* -------------------------------------------------------------------------
* @(1) Jump To First Word On Cursor Line "Marked" In The File Below
* -------------------------------------------------------------------------
* @1 macro has 2 steps:
* 1. Press @1. Line 1 is marked to highlight. Cursor down to
* desired line in Index.
* 2. Press <enter>. The macro then jumps to the first word
* cursor line in the File below.
* @1 differs from @f in that @1 will only jump to an Index item in the
* current file. @f will find them in an unlimited number of files.
@1 macrobegin
unmarkblock defaultwordset
begfile markline markline
pause
wordright markword copy endpara
find "(" paste ")" return "I" return
jfalse NOMARK
begline maketopofscreen scrollup
jump END
NOMARK:
begfile
END:
*
* 32 bytes Tue 09-11-1990 11:19:51
* 33 bytes Wed 06-26-1991 11:23:27 (TH @1, added defaultwordset)
* 33 bytes Fri 07-05-1991 10:31:13 (TH @1, moved makectrofscreen down)
* 33 bytes Wed 07-10-1991 10:11:24 (TH @1, moved makectrofscreen back up)
* 34 bytes Sun 07-28-1991 15:48:33 (TH @1, changed found cursor pos |a)
* This above version of @1 is 34 bytes. You may want to use the
* following shorter version (22 bytes) where searching starts from
* cursor line, not at the end of the first paragraph of the (Index), as
* above:
* @1 macrobegin
* defaultwordset begfile
* pause wordright markword copy
* find "(" paste ")" return delline return
* begline
*
* 21 bytes Tue 09-11-1990 11:22:45 added markline
* 22 bytes Wed 06-26-1991 11:23:27 (TH @1, added defaultwordset)
* 20 bytes Tue 05-26-1992 11:34:59 (TH @1, shortest possible)
*
* ----------------------------------------------------------------------
* @(2) Finds Word In File, Adds () To Found Word And Returns To Index
* ----------------------------------------------------------------------
* @2 macro has 3 steps:
*
* 1. Press Alt and 2 at the same time. The macro finds first word
* on the cursor line in the File below. If first found word
* is not the desired occurrence, press F4 for next word or until
* the desired occurrence is found.
*
* 2. When the desired word and location are found, press Enter.
* The macro places () around desired found word and then return
* to the original word in the Index.
*
* 3. Press Enter again and the macro places () around the original
* word in the Index. The cursor ends at end of the marked word in
* the Index so comments may be added. Be careful not to mark the
* same word more than once or only the first occurrence of the word
* in the File will be found with @1 and @f.
*
@2 macrobegin
defaultwordset wordright markword copy
find paste return "I" return
pause "(" markword gotoblockend ")"
pause begfile find return delline return
pause
markword gotoblockbeg "(" gotoblockend ") " unmarkblock
*
* 35 bytes Sat 07-28-1990 15:17:55
* 36 bytes Wed 06-26-1991 12:13:45 (TH @2, added defaultwordset)
* 38 bytes Sun 07-28-1991 16:24:04 (TH @2, changed Find's)
*
* ----------------------------------------------------------------------
* @(3) Puts Word @ Cursor In Index With () Around Marked Word And In Index
* ----------------------------------------------------------------------
* @3 macro has 2 steps:
*
* 1. Press Alt and 3 at the same time. Macro marks the word at the
* cursor in the File, then returns to the the end of the Index.
* The marked word in the File is then copied at the end of the
* Index with () around it. The cursor is at end of word so
* comments may be added in the Index.
*
* 2. Press Enter and the cursor returns to the beginning of
* the line of the marked word in the File.
*
@3 macrobegin
defaultwordset markword gotoblockbeg "(" gotoblockend ")"
copy begfile endpara addline begline "*" cursorright "("
paste endline cursorright unmarkblock makectrofscreen
pause
begline wordright markword copy find "(" paste ")" return return
begline
*
* 42 bytes Sat 07-28-1990 15:18:04
* 43 bytes Wed 06-26-1991 12:13:32 (TH @3, added defaultwordset)
* 41 bytes Sun 07-28-1991 16:16:19 (TH @3, shortened |a)
*
* -------------------------------------------------------------------------
* @(4) Jump To First Word On Cursor Line "Marked" In The File Below
* Positions Cursor On First Index Selection Line For Quicker Selection
* -------------------------------------------------------------------------
* This macro is an alternate version of @1 that positions the cursor on
* the first Index item line instead of the top line as @1 does. If the
* first Index item line does not have the first word enclosed in ( ),
* the cursor is positioned on the line containing a '('. This enables
* the user to quickly make a selection to jump to. See @1 for
* instructions. Remove setscreenOFF|ON if you are not using QEdit
* v2.15.
@4 macrobegin
setscreenoff
defaultwordset begfile endpara
unmarkblock markline begfile
find "(" return "L" return
jfalse NOMARK
makectrofscreen begfile
unmarkblock markline markline
prevposition begline
setscreenon pause setscreenoff
wordright markword copy endpara
find "(" paste ")" return "I" return
jfalse NOMARK
begline maketopofscreen scrollup jump END
NOMARK:
begfile
END:
*
* 34 bytes Sun 07-28-1991 15:48:33 (TH @1)
* 52 bytes Wed 07-31-1991 14:43:31 (TH @4 in BOOKxx.QM)
* 55 bytes Fri 11-08-1991 13:52:55 (TH @4, requires QEdit v2.15)
*
* ----------------------------------------------------------------------
* (f4) Continues Until Desired Word Is Found Using @2
* ----------------------------------------------------------------------
* (see @2 for use)
f4 repeatfind * Repeat find until desired word
* and location are found
* 5 bytes Sat 07-28-1990 15:18:17 (TH f4)
* (Version) History
* -------------------
* 2.3 - Modified @f for QEdit v2.15. 2/17/92
* (In Amac42.zip)
* 2.4 - Added setscreenOFF|ON to @6/7/8/9 in bok001.qm. 5/4/92
* - Modified @f in bok001.qm for macros in subfiles. 5/4/92
* (In Amac43.zip)
* 2.5 - Removed @0, @- and ^f1. 5/31/92
* Modified @6/7/8/9 in bok001.qm. 5/31/92
* - Switched @8/9 keys bok001.qm. 6/1/92
* - Modified @5/6 key find routine in subfiles. 6/3/92
* - Updated BOOK*.QM. 6/22/92
*
*
*
*
*
*
*--eof